package com.github.permissiondog.cancanpandroid.util;

import com.squareup.picasso.Picasso;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class NetUtil {
    public static final MyCookieJar COOKIE_JAR = new MyCookieJar();
    public static final OkHttpClient CLIENT = new OkHttpClient.Builder()
            .cookieJar(COOKIE_JAR)
            // TODO: 验证这里是否有效
            .retryOnConnectionFailure(true)
            .build();
    public static final Retrofit RETROFIT = new Retrofit.Builder()
            .baseUrl(Constants.BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .client(CLIENT)
            .build();
    public static Picasso PICASSO;
}
